package com.company.观察者模式;

public class Customer implements Observer{
    @Override
    public void update(Object arg) {
        int priceVar = (Integer) arg;
        if (priceVar>0){
            System.out.println("晚买等折扣");
        }else if (priceVar<0){
            System.out.println("早买早享受");
        }else if (priceVar==0){
            System.out.println("不买免费送");
        }
    }
}
